package com.lagou.goodshop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lagou.goodshop.pojo.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * @Authther: mrwu
 * @date:2021/5/15-05
 * @Description:com.lagou.goodshop.mapper
 */
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {

    @Select("select * from my_goods")
    List<Goods> myselect();
    @Update("update  my_goods set count=(count-1) where id=#{id}")
    int decreGoodsCount(String id);

}
